(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

b(y, z) → f(c(c(y, z, z), a, a))
b(b(z, y), a) → z
c(f(z), f(c(a, x, a)), y) → c(f(b(x, z)), c(z, y, a), a)

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of c: c

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
b(b(z, y), a) → z
c(f(z), f(c(a, x, a)), y) → c(f(b(x, z)), c(z, y, a), a)

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

b(y, z) → f(c(c(y, z, z), a, a))

Rewrite Strategy: INNERMOST

(3) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

b(y, z) → f(c(c(y, z, z), a, a)) [1]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

b(y, z) → f(c(c(y, z, z), a, a)) [1]

The TRS has the following type information:
b :: c → a → f
f :: c → f
c :: c → a → a → c
a :: a

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added:
none

And the following fresh constants:

const, const1

(8) Obligation:

Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

b(y, z) → f(c(c(y, z, z), a, a)) [1]

The TRS has the following type information:
b :: c → a → f
f :: c → f
c :: c → a → a → c
a :: a
const :: f
const1 :: c

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

a => 0
const => 0
const1 => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

b(z', z'') -{ 1 }→ 1 + (1 + (1 + y + z + z) + 0 + 0) :|: z'' = z, z >= 0, y >= 0, z' = y

Only complete derivations are relevant for the runtime complexity.

(11) CompleteCoflocoProof (EQUIVALENT transformation)

Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo:

eq(start(V, V1),0,[b(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(b(V, V1, Out),1,[],[Out = 3 + V2 + 2*V3,V1 = V3,V3 >= 0,V2 >= 0,V = V2]).
input_output_vars(b(V,V1,Out),[V,V1],[Out]).

CoFloCo proof output:
Preprocessing Cost Relations
=====================================

#### Computed strongly connected components
0. non_recursive : [b/3]
1. non_recursive : [start/2]

#### Obtained direct recursion through partial evaluation
0. SCC is completely evaluated into other SCCs
1. SCC is partially evaluated into start/2

Control-Flow Refinement of Cost Relations
=====================================

### Specialization of cost equations start/2
* CE 2 is refined into CE [3]


### Cost equations --> "Loop" of start/2
* CEs [3] --> Loop 2

### Ranking functions of CR start(V,V1)

#### Partial ranking functions of CR start(V,V1)


Computing Bounds
=====================================

#### Cost of chains of start(V,V1):
* Chain [2]: 1
with precondition: [V>=0,V1>=0]


Closed-form bounds of start(V,V1):
-------------------------------------
* Chain [2] with precondition: [V>=0,V1>=0]
- Upper bound: 1
- Complexity: constant

### Maximum cost of start(V,V1): 1
Asymptotic class: constant
* Total analysis performed in 8 ms.

(12) BOUNDS(1, 1)